import java.util.Scanner;

public class InandOut {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入你的姓名：");
        String name = scanner.next();
        System.out.println("姓名"+name);
        System.out.print("请输入你的年龄：");
        int age = scanner.nextInt();
        System.out.println("年龄"+age);
        System.out.print("请输入你的工资：");
        float salary = scanner.nextFloat();
        System.out.println("工资"+salary);
    }

    public static void main2(String[] args) {
        //alt+回车（查看函数实现）   ctr+鼠标左键（查看函数）      System.in键盘
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入你的年龄：");
        int age = scanner.nextInt();//输入语句
        System.out.println(age);
        System.out.print("请输入你的名字:");
        String name = scanner.next();//使用next读到空格便结束了
        //此时的nextLine会失效，因为我们输入年龄时敲了回车，它会把回车读入
        //String name = scanner.nextLine();
        System.out.println(name);
    }

    public static void main1(String[] args) {
        System.out.println(10);
        System.out.print("不换行\n ");
        System.out.printf("%s","这是格式化输出!");
    }
    }

